n=int(input())
nums=list(map(int,input().split()))

result=[]
result.append(int((nums[0]+nums[1])/2))

for i in range(1,n-1):
    result.append(int((nums[i-1]+nums[i]+nums[i+1])/3))

result.append(int((nums[-2]+nums[-1])/2))

for item in result:
    print(item,end=" ")
print("")